POV-Ray : Newsgroups : povray.newusers : getting the output file name : Re: getting the output file name Server Time
4 Nov 2024 19:21:11 EST (-0500)
  Re: getting the output file name  
From: Ross Litscher
Date: 17 Jan 2003 22:00:56
Message: <3e28c368@news.povray.org>
hughes, b. <omn### [at] charternet> wrote in message
news:3e28a561$1@news.povray.org...
> "Ross Litscher" <lit### [at] osuedu> wrote in message
> news:3e28806f$1@news.povray.org...
> > Hello all. motivated by a small discussion in p.b.i., i'm on a mission
to
> > find out how to get the output file name from the currently rendering
> scene.
> > actually, I guess i need the file name while parsing the scene. i've
> scanned
> > through the docs and searched on the web view of the newsgroups, but to
no
> > avail. any help would be appreciated. i basically want to write to a
file
> > with a similar filename. if the output image is called "my_scene.tga"
then
> > i'd like to write some text to a file called "my_scene.txt" without
having
> > to hard code the filenames in the .pov file. just getting the actual
> > filename is what i need, the rest i can manage.
> >
> > hopefully this makes sense. thankyou very much for any hints.
>
> Yes, does. You can do INI commands to use %s and get the name into such a
> file. See the doc section 5.2.4  Shell-out to Operating System and the
part
> immediately following.
>
>

I don't quite follow. I can create a file in povray without shelling out.
how can i get the filename contained in %s into some kind of variable for
use in pov code? what will a shell command get me? i guess if i knew the
windows command to make a new file then i could do something like:

Post_Scene_Command=make_new_file %s".txt"

or something similar, but then that still wouldn't let me know what the
filename is in the scenes pov code so i could continue with a #write (...)
command to write into that file.

maybe you are saying I should do a Post_Scene_Command to write the filename
to a file, then within the scene code do a #read  from that file to get the
filename i want into a variable?

i guess there are other ways to do what I ultmately wanted to do that needed
the filename accessible from within the scenes code.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.